<template>
	<view class="s-badge-class" :class="[dot?'s-badge-dot':'s-badge','s-'+type, size?'s-badge-small':'']" v-if="visible">
		<slot></slot>
	</view>
</template>

<script>
	export default {
		name: "sBadge",
		props: {
			//primary,warning,green,danger,white，black，gray
			type: {
				type: String,
				default: 'primary'
			},
			// '', small
			size: {
				type: String,
				default: ''
			},
			//是否是圆点
			dot: {
				type: Boolean,
				default: false
			},
			//是否可见
			visible: {
				type: Boolean,
				default: true
			}
		}
	}
</script>
<style lang="scss" scoped>
@import 's-badge.scss';
</style>
